<?php
/*
	插件初始化
*/
namespace jy_creditshop;
defined('BY_JYA') or exit('error');
function init($plugin){
	$plugin->plugins=array();
	if($_SESSION['onemerchid']){
		$plugin->setting=$plugin->plugin_setting('basic'.$_SESSION['onemerchid']);
	}else{
		$_SESSION['onemerchid']=0;
		$plugin->setting=$plugin->plugin_setting('basic');
	}
	$plugin->order_status=array('0'=>'待支付','1'=>'待发货','2'=>'待收货','3'=>'已完成','4'=>'已取消','5'=>'未抽中','6'=>'已退款');
	$credit_types=credit_types(true);
	$plugin->goodstype=array('0'=>'商品','1'=>'优惠券','2'=>'余额','3'=>'红包','4'=>$credit_types[4],'5'=>$credit_types[5],'6'=>$credit_types[6]);
	$plugin->xunitype=array(
		'3'=>$credit_types[3],
		'4'=>$credit_types[4],
		'5'=>$credit_types[5],
		'6'=>$credit_types[6]
	);
}